<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script language="javascript">
function Delete()
{ 
	if(!confirm("是否要删除？")) 
		return false; 
 
}
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<link  rel="stylesheet" type="text/css" href="../css/1.css"/>

	</head>
<link href="../css/daily.css" rel="stylesheet" type="text/css" />
	<body class="body">
	<div class="dailycontainer">
    <a href="newTopic.jsp" target="mainFrame" >发表日志</a>


			<table width="100%" align="center">
				<tr>

					<td bgcolor="#FFFFFF">
						<table width=100% height="93" align="center">
							<tr>
								<td align="center" valign="top">
									<table width=100% height="86" border="0" align="center"
										cellpadding="5" cellspacing="0">
										<tr>
											<td>
												<b>标题</b>
											</td>
											<td>
												<b>作者 </b>
											</td>
											<td>
												<b>发表时间 </b>
											</td>
											<td>
												<b>最后回复时间 </b>
											</td>
											<td>
												<b>更新</b>
											</td>
											<td></td>
										</tr>
										<s:iterator value="Dailys">
											<tr>
												<td>
													<s:set id="aa" value="DailyId" />
													<s:a href='getDaily?id=%{#aa}'>
														<s:property value="Title" />
													</s:a>
												</td>
												<td>
													<s:property value="UserId" />
												</td>
												<td>
													<s:property value="dateline" />
												</td>
												<td>
													<s:property value="lastpostdate" />
												</td>
												<td>
													<s:a href='updateDaily.jsp?id=%{#aa}'>更新</s:a>
												</td>
												<td>
													<s:a href='delDaly?id=%{#aa}' onclick='return Delete()'
														value="delDaly.action">删除</s:a>
												</td>
											</tr>
										</s:iterator>
									</table>
								</td>
							</tr>
							<tr>
								<td>
									<c:url var="url_last" value="show">
										<c:param name="pageNow" value="${pageNow-1}"></c:param>
									</c:url>
									<c:url var="url_next1" value="show">
										<c:param name="pageNow" value="${pageNow+1}"></c:param>
									</c:url>
									<c:url var="url_first" value="show">
										<c:param name="pageNow" value="1"></c:param>
									</c:url>
									<c:url var="url_end" value="show">
										<c:param name="pageNow" value="${pageCount}"></c:param>
									</c:url>
									<c:if test="${pageNow>1}">
										<a href="show?pageNow=1">首页</a>
										<a href="${url_last}">上一页</a>
									</c:if>
									<c:if test="${pageNow<=1}">
			                      首页
			                      上一页
			        </c:if>
									<c:if test="${pageNow<pageCount}">
										<a href="${url_next1}">下一页</a>
										<a href="show?pageNow=${pageCount}">尾页</a>
									</c:if>
									<c:if test="${pageNow>=pageCount}">
			                     下一页
			                      尾页
			        </c:if>
								</td>
							</tr>
			</table>
</div>
</body>
</html>
